﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BusinessLibrary.DAL;

namespace BusinessLibrary.BLL
{
   public class Pays
    {
  # region var
        public int  Id { get; set; }
        public string Nom { get; set; }
          

        #endregion
        #region methodes
        /// <summary>
        /// 
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public static Pays GetPaysById(int id)
        {
            return sqlPays.GetPaysById(id);
        }


        public static int deletePays(int id)
        {
            return sqlPays.deletPays(id);
        }


        public static int SavePays(Pays p)
        {
            int nbRow;
            if ((nbRow = sqlPays.updatePays(p)) > 0)
                return nbRow;
            else
                return sqlPays.insertPays(p);
        }
    }
        #endregion
}
